<?php
header('Cache-Control: no-cache, must-revalidate');
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Content-type: application/json');
include "Classes/class.class_Usuarios.php";
$aux=array();
$usuarios=array();
$json=array();
$usu=new class_Usuarios();
$usu->listar();
while($usu->devolver_proximo())
{
	$aux['id_usuario']=$usu->getid_usuario();
	$aux['nombre']=$usu->getnombre();
	$aux['apellido']=$usu->getapellido();
    $aux['id_rol']=$usu->getid_rol();
	$aux['nick']=$usu->getnick();
	$aux['email']=$usu->getemail();
	$aux['tel']=$usu->gettel();
	$usuarios[]=$aux;
}
$json["usuarios"]=$usuarios;
echo json_encode($json);
?>